package com.wyf.controller;

import com.wyf.dao.UserDao;
import com.wyf.pojo.User;
import com.wyf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/query")
    @ResponseBody
    public User queryUser(Integer userId) {
        return userService.queryUser(userId);
    }
}
